package com.sets;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class SetExample {

	public static void main(String[] args) {

		Set<String> persons = new HashSet<String>();

		persons.add("first");
		
		System.out.println("first".hashCode());
		
		System.out.println("first".hashCode());
		
		persons.add("first");
		persons.add("first");
		persons.add("first");
		persons.add("Second");
		persons.add("Second");
		
		
		for (Iterator<String> iterator = persons.iterator(); iterator.hasNext();) {
			String string =  iterator.next();
			
			System.out.println(string);
		}
		
		
		

	}
}
